package com.departmentstore.repository;

import com.departmentstore.entity.Product;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductRepository extends JpaRepository<Product, String> {
    // 根据产品名称查找产品
    List<Product> findByName(String name);
    
    // 根据产品类型查找产品
    List<Product> findByModel(String type);
    
    // 根据价格范围查找产品
    List<Product> findByBasePriceBetween(Double minPrice, Double maxPrice);
} 